<!--
 * @Author: your name
 * @Date: 2021-08-16 11:04:40
 * @LastEditTime: 2021-08-16 16:46:55
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\2-HTML&CSS\day11\西游记作业.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>西游记重写</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background-image: url(./west/bg.jpg);
            background-repeat: repeat-x;
            display: flex;
            justify-content: center;
            align-items: center;
            padding-top: 400px;
            animation: bgmove 20s infinite linear;
        }
        
        body>div {
            overflow: hidden;
            /* background-color: blueviolet; */
        }
        
        body>div:nth-child(1) {
            width: 200px;
            height: 180px;
        }
        
        body>div:nth-child(1)>img {
            animation: walk1 1s infinite steps(4);
        }
        
        body>div:nth-child(2) {
            width: 200px;
            height: 180px;
        }
        
        body>div:nth-child(2)>img {
            animation: walk1 1s infinite steps(8);
        }
        
        body>div:nth-child(3) {
            width: 170px;
            height: 240px;
        }
        
        body>div:nth-child(3)>img {
            animation: walk2 1s infinite steps(8);
        }
        
        body>div:nth-child(4) {
            width: 210px;
            height: 200px;
        }
        
        body>div:nth-child(4)>img {
            animation: walk3 1s infinite steps(4);
        }
        
        @keyframes walk1 {
            from {
                margin-left: 0;
            }
            to {
                margin-left: -1600px;
            }
        }
        
        @keyframes walk2 {
            from {
                margin-left: 0;
            }
            to {
                margin-left: -1360px;
            }
        }
        
        @keyframes walk3 {
            from {
                margin-left: 0;
            }
            to {
                margin-left: -1680px;
            }
        }
        
        @keyframes bgmove {
            from {
                background-position: 0 0;
            }
            to {
                background-position: 1920px 0;
            }
        }
    </style>
</head>

<body>
    <div>
        <img src="./west/wk.png" alt="">
    </div>
    <div>
        <img src="./west/bj.png" alt="">
    </div>
    <div>
        <img src="./west/ts.png" alt="">
    </div>
    <div>
        <img src="./west/ss.png" alt="">
    </div>
</body>

</html>